package copyengine
{
    import copyengine.infoTree.meta.CESMetaFacade;
    import copyengine.log.CELog;
    import copyengine.log.CcLogImpl;
    import copyengine.resource.resProxy.cacheData.CEResCacheDataFactory;
    import copyengine.resource.resProxy.cacheData.create.CEResCacheDataCreatorBasic;

    import flash.display.Stage;

    public class CopyEngineFacade
    {
        private static var mInstance:CopyEngineFacade;

        public static function  get instance():CopyEngineFacade
        {
            if (mInstance == null) {
                mInstance = new CopyEngineFacade();
            }
            return mInstance;
        }

        public function CopyEngineFacade()
        {
        }

        public function initialize(_stage:Stage):void
        {
            CESMetaFacade.initialize();

            //初始化Log系统
            var logger:CcLogImpl = new CcLogImpl();
            logger.initialize(_stage);
            CELog.setLogImpl(logger);

            //注册基础的资源文件解析
            CEResCacheDataFactory.instance.register(new CEResCacheDataCreatorBasic());
        }
    }
}
